<template>
  <div style="width:60%;margin:auto">
    <form class="form-horizontal">
      <div class="form-group">
        <label for="username" class="col-sm-3 control-label">用户名:</label>
        <div class="col-sm-8">
          <input type="text" class="form-control" id="username" placeholder="请输入用户名">
        </div>
      </div>
      <div class="form-group">
        <label for="password" class="col-sm-3 control-label">密码:</label>
        <div class="col-sm-8">
          <input type="password" class="form-control" id="password" placeholder="请输入密码">
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-3 col-sm-10">
          <button type="button" v-on:click="onLogin" id="btn_login" class="btn btn-default">登录</button>
        </div>
      </div>
    </form>
  </div>
</template>

<script>
  export default {
    name: 'login',
    data () {
      return {
        username: '',
        password: ''
      }
    },
    methods: {
      onLogin () {
        alert('on login')
      }
    }
  }

</script>
